﻿#region Using

using System;
using System.ServiceModel;

using CommunicationLibrary;

#endregion

namespace TestClient
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var callback = new Client();
            var proxy = DuplexChannelFactory<IServer>.CreateChannel(callback, FarmersBreakfastTcpBinding.Instance, new EndpointAddress("net.tcp://localhost:1338/Server"));
            var networkresult = proxy.RegisterForMatch(new Random().Next().ToString());

            Console.WriteLine(networkresult.Message);
            Console.ReadLine();

            networkresult = proxy.ReadyForGameStart();

            Console.WriteLine(networkresult.Message);
            Console.ReadLine();

            networkresult = proxy.PauseGame();

            Console.WriteLine(networkresult.Message);
            Console.ReadLine();

            networkresult = proxy.ResumeGame();

            Console.WriteLine(networkresult.Message);
            Console.ReadLine();
        }
    }
}